package ord2.convert;

import java.io.File;

/**
 * This interface specifies a way to convert a givin type into another without
 * parameters.
 * @author José Ivan
 * @author Edviges
 * 
 * @see ParametricConverter
 */
public interface Converter {
    
    /**
     * Executes a conversion with given file and stores results in a output
     * file.
     * @param in File object that represents a documents to be converted
     * @param out File object that will be used to store result.
     * @throws ConvertException General exception if convertion fails.
     * @see Converter#convert(byte[], byte[]) 
     */
    void convert(File in, File out) throws ConvertException;
    
    /**
     * Executes a conversion using a array of bytes and stores results into another
     * array of bytes.
     * @param in Array containg bytes to be converted.
     * @param out Array that will be filled with bytes converted.
     * @throws ConvertException General exception if convertion fails.
     * @see Converter#convert(java.io.File, java.io.File) 
     */
    void convert(byte[] in, byte[] out) throws ConvertException;
}